package cn.supuwoerc.Transaction;

import cn.supuwoerc.config.SpringConfig;
import cn.supuwoerc.service.AccountService;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(classes = {SpringConfig.class})
public class DemoWithAnno {
    //xml方式配置spring时不能写下面的注解  不然会报错
    //@Autowired
    //@Qualifier("accountService")
    private AccountService accountService;

    @Test
    public void transferTest() {
        accountService.transfer("zhangsan", "lisi", 500);
    }
}
